package br.com.tecnoria.vo
{
	import br.com.tecnoria.util.Util;

	[Bindable]
	[RemoteClass(alias="ProductVO")]
	public class ProductVO
	{
		public var idProduct:int;
		public var name:String;
		public var description:String;
		public var price:Number;
		public var type:String;
		
		public var file:FileVO;
		
		public static const FOOD:String = "food";
		public static const DRINK:String = "drink";
		
		public function ProductVO(product:Object = null)
		{
			this.file = new FileVO;
			
			if (product != null)
			{
				this.idProduct = product.idProduct;
				this.name = product.name;
				this.description = product.description;
				this.price = product.price;
				this.type = product.type;
				
				this.file = product.file;
			}
		}
		
		public function get formatPrice():String
		{
			return Util.formatNumber(this.price);
		}
	}
}